package com.xxxt.jxj.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.transaction.annotation.Transactional;

import org.springframework.stereotype.Service;

import com.xxxt.dao.SpecialtyMapper;
import com.xxxt.entity.Grade;
import com.xxxt.entity.Specialty;
import com.xxxt.jxj.service.SpecialtyService;

@Service
@Transactional
public class SpecialtyServiceImpl implements SpecialtyService {
	
	@Resource
	private SpecialtyMapper specialityMapper;
	@Override
	public List<Specialty> selcetAllSpecialtyByCollegeId(String collegeId) {
		// TODO Auto-generated method stub
		return specialityMapper.selcetAllSpecialtyByCollegeId(collegeId);
	}

	@Override
	public List<Specialty> selcetAllSpecialty() {
		// TODO Auto-generated method stub
		return specialityMapper.selcetAllSpecialty();
	}

	@Override
	public List<Specialty> selcetAllPageSpecialtyByCollegeId(String collegeId, int pageNum, int pageSize) {
		// TODO Auto-generated method stub
		return specialityMapper.selcetAllPageSpecialtyByCollegeId(collegeId);
	}

	@Override
	public Specialty selcetOneSpecialtyBySpecialtyId(String specialtyId) {
		// TODO Auto-generated method stub
		return specialityMapper.selcetOneSpecialtyBySpecialtyId(specialtyId);
	}

	@Override
	public boolean insertSpecialty(Specialty specialty) {
		// TODO Auto-generated method stub
		return specialityMapper.insertSpecialty(specialty);
	}

	@Override
	public boolean deleteSpecialty(String specialtyId) {
		// TODO Auto-generated method stub
		return specialityMapper.deleteSpecialty(specialtyId);
	}

	@Override
	public boolean updateSpecialty(String specialtyName, String collegeId, String id) {
		// TODO Auto-generated method stub
		return specialityMapper.updateSpecialty( specialtyName, collegeId, id);
	}

	@Override
	public List<Grade> selectStudentByTnoAndCollege(List<Specialty> specialties) {
		// TODO Auto-generated method stub
		return specialityMapper.selectStudentByTnoAndCollege(specialties);
	}

}
